﻿@using HopNguyenModel.General
@using PagedList
@using PagedList.Mvc
@model IEnumerable<HopNguyenModel.Content>

<div class="box-big">
    <div class="box-big-top">
        <h3>Kết quả tìm kiếm</h3>
    </div>
    <div class="box-big-bg">
        <div class="text-box-big">
            @foreach (var item in Model)
            {
                <div class="news-item">
                    <div class="img-news">
                        <a href="/@item.TypeContent.Alias/@(item.Alias).html" title="@item.Name">
                            <img src="@item.Image" alt="@item.Name" onerror="this.src='/frontend/img/default.jpg'" />
                        </a>
                    </div>
                    <div class="intro-news">
                        <h1 class="title-intro-news">
                            <a href="/@item.TypeContent.Alias/@(item.Alias).html" title="@item.Name">@item.Name</a>
                        </h1>
                        @item.Summary
                        @if (item.Tags.Count > 1)
                        {
                            <p>
                                <strong>Tags</strong>: 
                                @foreach (var tag in item.Tags)
                                {
                                    <a href="/tags/@(Tool.ReplaceSpace(tag.Name)).html" title="@tag.Name">@tag.Name.ToLower(), </a>
                                }
                            </p>
                        }
                    </div>
                </div>
            }
            @Html.PagedListPager((IPagedList)Model, p => Url.Action("Index", new { p}))
        </div>
    </div>
</div>
